<?php 
	include ("../../config/koneksi.php");
	$q = "select * from master_diagnosis";
	$r = mysql_query($q);
	
	$content = "KODE;NAMA DIAGNOSIS;KETERANGAN;NOT KLAIM\n";
	while ($data = mysql_fetch_array($r)) {
		$no++;
		$content .= "$data[icd10];$data[nama];$data[keterangan];$data[not_klaim]\n";
	};

	header("Content-type: text/csv");
	header("Content-Disposition: attachment; filename=master_diagnosis.csv");
	header("Pragma: no-cache");
	header("Expires: 0");
	echo $content;
?>